Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Collection Repeat: Use root scope when checking for in-progress digest #1518

Closed
wants to merge 3 commits into from

Conversation

mrwade
Copy link

@mrwade mrwade commented May 29, 2014

I was having an issue using collection-repeat when a digest was in-progress. The in-progress digest was reflected on the root scope by checking $$phase, but not when checking $$phase on the child scope that collection-repeat was using. This was causing the ol' "digest already in progress" error.

This pull request is to update collection-repeat to use the root scope when checking for an in-progress digest.

Note: I tried to recreate this bug in smaller codepen example that I could share but was unfortunately unable to do so. I am actually unsure of the exact conditions that cause this issue. :-/

@perrygovier
Copy link
Contributor

Hey mrwade, it's best if we can reliably reproduce a bug, but this seems pretty straight forward. @ajoslin what do you think?

@ajoslin
Copy link
Contributor

ajoslin commented May 29, 2014

It seems like a reasonable change to me.

@mrwade could you change it so that collectionRepeatDataSource injects $rootScope and use if (!$rootScope.$$phase) {instead of item.scope.$root.$$phase?

@mrwade
Copy link
Author

mrwade commented May 31, 2014

@ajoslin Done.

@ajoslin ajoslin closed this in 74a4612 Jun 4, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants